﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Comain.Orders
{
    /// <summary>
    /// 订单表
    /// </summary>
    [Table("T_Order")]
    public class T_Order
    {
        /// <summary>
        /// 雪花编号
        /// </summary>
        [Key]
        public string Order_SnowId { get; set; }

        /// <summary>
        /// 订单来源(APP、电脑端、前台登记)
        /// </summary>
        [StringLength(30)]
        public string Order_From { get; set; } = string.Empty;

        /// <summary>
        /// 入住人
        /// </summary>
        [StringLength(30)]
        public string? Order_UserName { get; set; }

        /// <summary>
        /// 入住手机号
        /// </summary>
        [StringLength(11)]
        public string? Order_UserPhone { get; set; }

        /// <summary>
        /// 入住时间
        /// </summary>
        public DateTime Order_InTime { get; set; }

        /// <summary>
        /// 离店时间
        /// </summary>
        public DateTime Order_OutTime { get; set; }

        /// <summary>
        /// 入住人备注信息
        /// </summary>
        [StringLength(200)]
        public string? Order_Desc { get; set; }

        /// <summary>
        /// 入住金额
        /// </summary>
        public decimal? Order_Money { get; set; }

        /// <summary>
        /// 房间编号
        /// </summary>
        public string? Order_RoomNum { get; set; }

        /// <summary>
        /// 房客ID
        /// </summary>
        public string? Order_UserId { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public OrderStateEnum Order_State { get; set; }

        /// <summary>
        /// 订单是否删除(false"未删除"，true"已删除")
        /// </summary>
        public bool Order_IsDel { get; set; } = false;
    }
}
